<!--@author :hly
@github :https://github.com/huangliangyun
@blog :blog.csdn.net/Sirius_hly
@date :2018/10/29
-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h3>I am 401 page ,if you don't have authority ,you can't visit </h3>
<div>
    <div>
        <h3>权限不够</h3>
    </div>
    <div sec:authorize="isAuthenticated()">
        <p>已有用户登录</p>
        <p>用户：<span sec:authentication="name"></span></p>
        <p>角色：<span sec:authentication="principal.authorities"></span></p>
    </div>
    <div sec:authorize="isAnonymous()">
        <p>未有用户登录</p>
    </div>
    <p>拒绝访问</p>
</div>
</body>
</html>